Adding USB modem support to Yocto #raspberrypi
Hi!
I'm a new Yocto user trying to develop a fork of Chirpstack's Gateway OS ( https://github.com/brocaar/chirpstack-gateway-os ) for Raspberry Pi based LoRaWAN gateways. Although I have successfully modified and added new recipes, I'm struggling with adding a USB cellular modem to my image.
I have a Huawei E303C USB modem and followed the instructions from the Embexus website ( https://embexus.com/2017/06/04/add-a-mobile-broadband-connectivity-to-embedded-linux/ ) with no success. It basically proposes using oFono + connman to create a network interface, but after running the instructed commands, I get this error:
$ sudo /usr/lib/ofono/test/activate-context Error activating /huawei_0/context1: org.ofono.Error.NotImplemented: Implementation not provided
As an additional step, I enabled roaming using the set-roaming-allowed script in the oFono tests directory. I made the kernel configuration in layers ( https://github.com/brocaar/chirpstack-gateway-os/tree/master/layers ) / targets ( https://github.com/brocaar/chirpstack-gateway-os/tree/master/layers/targets ) / meta-raspberrypi ( https://github.com/brocaar/chirpstack-gateway-os/tree/master/layers/targets/meta-raspberrypi ) / recipes-kernel ( https://github.com/brocaar/chirpstack-gateway-os/tree/master/layers/targets/meta-raspberrypi/recipes-kernel ) / linux ( https://github.com/brocaar/chirpstack-gateway-os/tree/master/layers/targets/meta-raspberrypi/recipes-kernel/linux ) /linux-raspberrypi_%.bbappend and the connman package conf iguration in meta ( https://github.com/brocaar/chirpstack-gateway-os/tree/master/meta ) / conf ( https://github.com/brocaar/chirpstack-gateway-os/tree/master/meta/conf ) / distro ( https://github.com/brocaar/chirpstack-gateway-os/tree/master/meta/conf/distro ) /chirpstack-gateway-os.conf.
I considered installing NetworkManager from the OpenEmbedded layer. Still, it has a declared conflict with connman, which is used to set a WIFI AP, and I don't want to remove that feature.
This is the output from the list-modems script:
[ /huawei_0 ]
Online = 1
Powered = 1
Lockdown = 0
Emergency = 0
Manufacturer = huawei
Model = E303C
Revision = 21.157.01.01.18
Serial = 867360018081349
SystemPath = /sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3
Interfaces = org.ofono.CellBroadcast org.ofono.NetworkRegistration org.ofono.SupplementaryServices org.ofono.CallBarring org.ofono.CallSettings org.ofono.CallForwarding org.ofono.MessageWaiting org.ofono.ConnectionManager org.ofono.SmartMessaging org.ofono.PushNotification org.ofono.MessageManager org.ofono.RadioSettings org.ofono.Phonebook org.ofono.AudioSettings org.ofono.VoiceCallManager org.ofono.AllowedAccessPoints org.ofono.SimManager Features = cbs net ussd gprs sms rat sim
Type = hardware
[ org.ofono.CellBroadcast ]
Powered = 0
Topics = 2,4,36,50,118,135,255,555,569
[ org.ofono.NetworkRegistration ]
Status = roaming
Mode = auto
Technology = umts
MobileCountryCode = 334
MobileNetworkCode = 020
Name = EMnify (Mx Telcel GSM)
Strength = 41
[ org.ofono.SupplementaryServices ]
State = idle
[ org.ofono.CallBarring ]
VoiceOutgoing = disabled
VoiceIncoming = disabled
[ org.ofono.CallSettings ]
CallingLinePresentation = enabled
CallingNamePresentation = unknown
ConnectedLinePresentation = disabled
ConnectedLineRestriction = unknown
CalledLinePresentation = disabled
CallingLineRestriction = off
HideCallerId = default
VoiceCallWaiting = disabled
[ org.ofono.CallForwarding ]
VoiceUnconditional =
VoiceBusy =
VoiceNoReply =
VoiceNoReplyTimeout = 20
VoiceNotReachable =
ForwardingFlagOnSim = 0
[ org.ofono.MessageWaiting ]
VoicemailWaiting = 0
VoicemailMessageCount = 0
VoicemailMailboxNumber =
[ org.ofono.ConnectionManager ]
Attached = 1
Bearer = umts
RoamingAllowed = 1
Powered = 1
Suspended = 0
[ org.ofono.SmartMessaging ]
[ org.ofono.PushNotification ]
[ org.ofono.MessageManager ]
ServiceCenterAddress = +42379010570
UseDeliveryReports = 0
Bearer = cs-preferred
Alphabet = default
[ org.ofono.RadioSettings ]
[ org.ofono.Phonebook ]
[ org.ofono.AudioSettings ]
Active = 0
[ org.ofono.VoiceCallManager ]
EmergencyNumbers = 118 110 08 911 000 112 999 119
[ org.ofono.AllowedAccessPoints ]
[ org.ofono.SimManager ]
Present = 1
CardIdentifier = 89883030000055775206
SubscriberIdentity = 295050901033049
ServiceProviderName = EMnify
FixedDialing = 0
BarredDialing = 0
MobileCountryCode = 295
MobileNetworkCode = 05
SubscriberNumbers =
LockedPins =
PreferredLanguages = de en
PinRequired = none
Retries = [pin = 3] [pin2 = 3] [puk = 10] [puk2 = 10]
CardSlotCount = 1
ActiveCardSlot = 1